package cvut.fit.dpo.composite;

import cvut.fit.dpo.operators.IOperator;

public class Composite implements IComponent {

	private IComponent left = null;
	private IComponent right = null;
	
	private IOperator operator = null;
	
	public Composite(IOperator op) {
		this.operator = op;
	}
	
	@Override
	public int getValue() {
		return this.operator.evaluate(left, right);
	}

}
